<?php $this->pageTitle = 'Update Payable Item Details'; ?>

<?php
$header = 'Update Payable Item';
$this->breadcrumbs = array(
	'Commission Payable' => array('/commissionPayable/index'),
	$header
);
?>

<div class="main-title no-border clearfix">
	<h3 class="float-left">
		<?php echo 'Payee: ' . $payableItem->getPayeeName(); ?><br/>
		For the property transacted at: 
		<?php echo $payableItem->propertyCase->property->prop_address_formatted; ?>
	</h3>
</div>
<div class="grid_16">
    <div class="section">
		<div class="block">
			<div class="form">
				<?php
				$form = $this->beginWidget('PsActiveForm', array(
					'id' => 'update-payable-item-form',
					'enableAjaxValidation' => false,
					'htmlOptions' => array(
						'class' => 'form'
					)
						));
				?>
				<div class="table-block">
					<table class="form-table">
						<tr>
							<th scope="row" width="170">
								<?php echo $form->labelEx($payableItem, 'receipt_number', array('label' => 'Related Receipt #')); ?>
							</th>
							<td>
								<?php echo $form->textField($payableItem, 'receipt_number', array('size' => 30, 'readonly' => 'readonly')); ?>
								<button id="btnSelReceipt" class="link-button with-icon" type="button">
									<img src="/images/icons/fugue/magnifier-zoom-in.png" /> 
									Select Receipt
								</button>
								<?php echo $form->hiddenField($payableItem, 'payment_id'); ?>
								<?php echo $form->error($payableItem, 'payment_id'); ?>
							</td>
						</tr>
						<tr>
							<th scope="row" width="170">
								<?php echo $form->labelEx($payableItem, 'description'); ?>
							</th>
							<td>
								<?php echo $form->textArea($payableItem, 'description'); ?>
								<?php echo $form->error($payableItem, 'description'); ?>
							</td>
						</tr>
						<tr>
							<th scope="row" width="80">
								<?php echo GxHtml::submitButton('Save', array('name' => 'submit', 'class' => 'green no-margin')); ?>
								&nbsp;or <a class="link" href="<?php echo $this->createUrl('commissionPayable/index'); ?>">Cancel</a>
							</th>
							<td></td>
						</tr>
					</table>
				</div>
				<?php $this->endWidget(); ?>
			</div>
		</div>
	</div>
</div>

<?php
$this->renderPartial('_dialog_chooseReceipt', array(
	'receiptDataProvider' => $receiptDataProvider,
	'searchReceipt' => $searchReceipt
));
?>